package com.qijian.business.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;

/**
 * 工单对象 kr_work_feed
 *
 * @author qijian
 * @date 2024-02-27
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("kr_work_feed")
public class KrWorkFeed extends BaseEntity{
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "唯一id")
    private Long id;

    @Excel(name = "来源工单id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "来源工单id")
    private Long sourceId;

    @Excel(name = "状态(是否生成流转卡)")
    @ApiModelProperty(value = "状态(是否生成流转卡)")
    private String status;

    @Excel(name = "流转卡号")
    @ApiModelProperty(value = "流转卡号")
    private String circulationNo;

    @Excel(name = "质检状态")
    @ApiModelProperty(value = "质检状态")
    private Boolean examineStatus;

    @Excel(name = "投料量")
    @ApiModelProperty(value = "投料量")
    private BigDecimal feedQty;

    @Excel(name = "出库量")
    @ApiModelProperty(value = "出库量")
    private BigDecimal outQty;

    @Excel(name = "炉号")
    @ApiModelProperty(value = "炉号")
    private String headNo;

    @Excel(name = "实际炉号")
    @ApiModelProperty(value = "实际炉号")
    private String actualHeadNo;

    @Excel(name = "sd_inventory表id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "sd_inventory表id")
    private Long inventoryId;

    @Excel(name = "物料id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "物料id")
    private Long itemId;

    @Excel(name = "物料代码")
    @ApiModelProperty(value = "物料代码")
    private String itemCode;

    @Excel(name = "物料名称")
    @ApiModelProperty(value = "物料名称")
    private String itemName;

    @Excel(name = "投料号")
    @ApiModelProperty(value = "投料号")
    private String feedNo;

    @Excel(name = "使用量")
    @ApiModelProperty(value = "使用量")
    private BigDecimal useQty;

    @Excel(name = "是否确认", readConverterExp = "0=、未确认1、已确认")
    @ApiModelProperty(value = "是否确认（0、未确认1、已确认）")
    private String feedStatus;

    @Excel(name = "是否领用")
    @ApiModelProperty(value = "是否领用")
    private Boolean useStatus;

    @Excel(name = "层级")
    @ApiModelProperty(value = "层级")
    private Long level;

    @Excel(name = "编号")
    @ApiModelProperty(value = "编号")
    private String detailCode;

    @Excel(name = "父级id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "父级id")
    private Long parentId;

    @Excel(name = "是否暂停")
    @ApiModelProperty(value = "是否暂停")
    private Boolean isStop;

    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;

    @Excel(name = "内部件号")
    @ApiModelProperty(value = "内部件号")
    private String internalNumber;

    @Excel(name = "派工表id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "派工表id")
    private Long dispatchId;

    @TableField(exist = false)
    private BigDecimal confirmQty;

}
